<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\Database\Model\Relations\HasOne;

/**
 * Class AftersaleProduct
 * @package App\Model
 */
class AftersaleProduct extends Model
{
    public $timestamps = false;
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fly_aftersale_products';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [];

    /**
     * 售后对应订单商品
     * @return HasOne
     */
    public function with_order_products()
    {
        return $this->hasOne(FlyOrderProduct::class, 'id', 'order_p_id');
    }
}